package config

import "server/share/protoc"

// GetChallenge 根据战区关卡ID获取战区
func GetChallenge(stage int32) *protoc.Challenge {
	if stage == 0 {
		stage = 1
	}
	for _, v := range Data.Challenge {
		if stage >= v.ChapterStart && stage <= v.ChapterEnd {
			return v
		}
	}
	return nil
}
